﻿-- Define the relationship between Person and Person
ALTER TABLE [dbo].[Person] WITH CHECK ADD  
       CONSTRAINT [FK_Person_UserType] FOREIGN KEY([UserType])
REFERENCES [dbo].[Person] ([PersonId])
ON DELETE NO ACTION
GO
-- Define the relationship between Person and Person
ALTER TABLE [dbo].[Person] WITH CHECK ADD  
       CONSTRAINT [FK_Person_CreatedByPerson] FOREIGN KEY([CreatedBy])
REFERENCES [dbo].[Person] ([PersonId])
ON DELETE NO ACTION
GO
-- Define the relationship between Person and Person
ALTER TABLE [dbo].[Person] WITH CHECK ADD  
       CONSTRAINT [FK_Person_LastChangedBy] FOREIGN KEY([LastChangedBy])
REFERENCES [dbo].[Person] ([PersonId])
ON DELETE NO ACTION
GO